home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Texteditors / GoldED Tools / Src2GED / Src2GEDProj.ged next >
Encoding:
Text File  |  1996-09-27  |  2.8 KB  |  119 lines

  1. /* $VER: 0.1, ©1996 M. Puts C, C++ and Header files into the Project list
  2.  
  3. INTRODUCTION
  4.  
  5.     When I make a C or C++ program, I hold all the #?.c, #?.h, #?.o and all
  6.     other stuff in one directory and sometimes it's not easy to find a
  7.     source file in GED's file requester. So I started to use the Project
  8.     feature but I was too lazy to maintain the list by hand. So I made
  9.     this simple macro. It scans current directory for source files and
  10.     puts them into the Project list. If you use assembler or E or any
  11.     other language, just change the pattern on line 87.
  12.  
  13.  
  14. USAGE
  15.  
  16.     Use it the same way like any other GoldEd arexx macro. I use it as
  17.     GoldEd startup macro.
  18.  
  19.  
  20. INSTALLATION
  21.  
  22.     Just copy it anywhere, e.g. golded:arrexx and run it from GoldEd somehow.
  23.     List and Sort commands must be present in C:
  24.  
  25.  
  26. LEGAL INFO
  27.  
  28.     This macro is freeware. You can copy it as long as you do not modify
  29.     the package. You can include it in any PD collection as long as you
  30.     let me know about it. Free CDs appreciated!
  31.  
  32.  
  33. DISCLAIMER
  34.  
  35.     Use this macro at your own risk, blah blah blah
  36.  
  37.  
  38. FEEDBACK
  39.  
  40.     If you like it, please send me an E-mail like this:
  41.  
  42. ------------------------- Cut here ---------------------------------
  43.  
  44. To: trochtam@risc.upol.cz
  45. Subject: I LOVE your GED macro !!!!
  46.  
  47. Hi, M!
  48.  
  49.     I just downloaded your Src2Proj macro and I've got to say it's
  50. really cool. Great idea ! I use it as a GoldED startup macro and my
  51. life is much easier now. Thank you.
  52.  
  53.                             regards,
  54.  
  55.                                         < sign here >
  56.  
  57. ------------------------- Cut here ---------------------------------
  58.  
  59.  
  60. AUTHOR
  61.  
  62.     E-Mail: trochtam@risc.upol.cz
  63.  
  64.     WWW homepage: http://risc.upol.cz/~trochtam/
  65.  
  66.     Snail-mail:
  67.         Myra Trochta
  68.         Kratka 708
  69.         757 01 Valasske Mezirici
  70.         Czech Republic
  71.  
  72.     Phone: +42-651-24615
  73.  
  74. P.S. Excuse my English - e.g. I don't know if I spell the word "blah" correctly
  75. P.P.S. ;-)
  76. */
  77.  
  78. OPTIONS RESULTS                             /* enable return codes     */
  79.  
  80. if (LEFT(ADDRESS(), 6) ~= "GOLDED") then    /* not started by GoldEd ? */
  81.     address 'GOLDED.1'
  82.  
  83.  
  84. project clr  /* comment this out if you wanna keep previous entries */
  85.  
  86.  
  87. address command 'c:list >t:project pat #?.(cpp|h|c|cc|cxx|hh|c++) lformat "%s%s"'
  88.                                        /* Pattern of the files to be added */
  89.  
  90. if open(file,'t:project',read) = 0 then
  91.                                    return 0
  92.  
  93. line = readln( file )
  94. call close( file )
  95. if line = "" then do
  96.     return 0
  97. end
  98.  
  99. address command 'c:sort from t:project to t:project'
  100.  
  101. OPTIONS FAILAT 21
  102.  
  103. if open( file, 't:project', read ) = 0 then
  104.                                        return 0
  105. fini = 0
  106. do until fini
  107.     line = readln( file )
  108.     if line~="" then
  109.     do
  110.         PROJECT ADD line
  111.     end
  112.     fini = eof( file )
  113. end
  114. call close( file )
  115.  
  116. address command 'c:delete >nil: t:project'
  117.  
  118. EXIT
  119.